package com.lldpet.spring.cloud.demo.stream.consumer.demo.listener;

import com.lldpet.spring.cloud.demo.stream.consumer.demo.channel.BpsSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

/**
 * @desc：BpsMqMessageListener 自定义消息监听
 * @author: guanliang.xue
 * @date: 2021/5/12 09:21
 * @version:
 * @since:
 */
@EnableBinding(BpsSource.class)
public class BpsMqMessageListener {

    private static final Logger logger = LoggerFactory.getLogger(BpsMqMessageListener.class);

    @StreamListener(BpsSource.INPUT_CHANNEL)
    public void input(String message){
        logger.info("BpsMqMessageListener 接收到自定义消息: {}",message);
    }
}
